#include<iostream>
using namespace std;

class Base {
public:
    Base(){};
    ~Base(){};
    virtual void get_val()
    {
        cout << "this is Base" << endl;
    }
private:
    int val;
};

class Time : public Base {
public:
    Time(){};
    ~Time(){};
private:
    int val;
    virtual void get_val()
    {
        cout << "this is Time" << endl;
    }
};

int main()
{
    Base* ba = new Time;
    ba->get_val();
    return 0;
}